<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
	<table class="table">
		<tr>
			<th>姓名</th>
			<th>学号</th>
			<th>成绩</th>
		</tr>
		<c:forEach items="${student}" var="c">
			<tr>
				<td>${c.name}</td>
				<td>${c.stuNum}</td>
					<td>
					   	<input type="text" onchange = "changegrade(this.value, ${c.id})" name="grade" value="${c.cj}"  placeholder="成绩"  class="form-control">
					</td>
			</tr>
		</c:forEach>
	</table>

<script type = "text/javascript">
	function changegrade(grade, xsid){
		var kcid = $("#courseid").val();
		$.post("../grade/save?grade="+grade+"&kcid="+kcid+"&xsid="+xsid);
	}
</script>
